<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %> 
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions"prefix="fn" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<title>商品详细信息</title>
<%@ include file="../include/include.jsp"%>
<link rel="stylesheet" type="text/css" media="all" href="./css/feground/styles.css">
<script type="text/javascript" src="./js/lazyload/lazyload_src.js"></script>

<script type="text/javascript" src="./js/fg/commodity/commodity.js"></script>
<script type="text/javascript">
	$(document).ready(function() {
		var commodityId = $("#commodityId").val();
		var lables = '${commodityInfo.lables}';
		var url = "index_commodity_loadCommodityInfo.htm?lables=" + encodeURI(encodeURI(lables)) ;
		commodity.loadLableInfo(commodityId,"${commodityInfo.title}","${rootPicPath}${commodityInfo.picPath}");
		commodity.loadCommodityInfo(url);
	});
</script>
</head>
<body style="overflow: inherit;" class="no-subnav page-home">
<c:import url="../include/default_head.jsp" />
<form id="commodityDetailForm" action="#" method="post">
<input type="hidden" id="commodityId" name="commodityInfo.commodityId" value="${commodityInfo.commodityId }"/>
<!-- / header -->

<div class="container ">
	<div id="content">
		<div class="teaser alt">
			<div class="container">
			</div>
			<!-- / container -->
		</div>
		<!-- / teaser -->
		<div class="wrapper-content">
			<ol class="stream stream-no-title">
				<li>
					<div class="figure-row">
						<div class="figure-product figure-830">
							<a href="#">
							<figure>
								<span class="wrapper-fig-image"> <span class="fig-image"> <img src="${rootPicPath}${commodityInfo.picPath}"> </span> </span>
								<figcaption> ${commodityInfo.title}</figcaption>
							</figure>
							</a> <br class="hidden">
							<span class="username"><a href="#">${commodityInfo.petName}</a>&nbsp;<a href="#">贴条</a><em id="tietiao_num_detail_${commodityInfo.commodityId }">+${commodityInfo.tietiaoNum}</em></span> 
							
							<c:choose>
								<c:when test="${user.userId == null or user.userId == commodityInfo.uploaderId}">
								</c:when>
								<c:otherwise>
									<c:choose>
										<c:when test="${commodityInfo.myTietiaoFlag != null }">
											<br >
											<a href="javascript:com.tietiao.shitiao('${ commodityInfo.commodityId}')" class="followed" require_login="true" id="tie_shi_detail_${commodityInfo.commodityId }"><span></span>撕条</a> 
										</c:when>
										<c:otherwise>
											<br >
											<a href="javascript:com.tietiao.showTietiaos('show_tie_${commodityInfo.commodityId }','${commodityInfo.commodityId }')" class="button button-follow" require_login="true" id="tie_shi_detail_${commodityInfo.commodityId }"><span></span>贴条</a> 
										</c:otherwise>
									</c:choose>
										</c:otherwise>
							</c:choose>
						</div>
					</div>
				</li>
				<div class="buy-link">
					<a href="#" >购买价格:${commodityInfo.price}</a> <br/>
					<a href="${commodityInfo.buyAddress}" target="_black">购买链接:${commodityInfo.buyAddress}</a>
				</div>
				<div class="buy-link" style="*margin-bottom:10px;">
				   <c:choose>
						<c:when test="${user.userId == null or user.userId == commodityInfo.uploaderId}">
						</c:when>
						<c:otherwise>
							<c:choose>
								<c:when test="${commodityInfo.myTietiaoFlag != null }">
									<a class="followed" style="*float:left;" href="javascript:com.tietiao.shitiao('${ commodityInfo.commodityId}')" id='tie_shi_button_${ commodityInfo.commodityId}'>撕条</a> 
								</c:when>
								<c:otherwise>
									<a class="follow" style="*float:left;" href="javascript:com.tietiao.showTietiaos('show_tie_${commodityInfo.commodityId }','${commodityInfo.commodityId }')" id='tie_shi_button_${ commodityInfo.commodityId}'>贴条</a> 	
								</c:otherwise>
							</c:choose>
							</c:otherwise>
					</c:choose>
					<a class="recommend" href="#" style="*float:left;" onclick="javascript:commodity.recommendOnclick();">推荐给他人</a>
					<c:if test="${user.userId != null and user.userId != commodityInfo.uploaderId}">
						<a class="mailto" href="#msg-new" style="*float:left;" title="给Ta发私信" onclick="javascript:com.tietiao.sendLetterView('${commodityInfo.uploaderId}','${commodityInfo.petName}');return false;">给Ta发私信</a>
					</c:if>
				</div>
			</ol>
			<div class="reply" id="commodity_lable_id"></div>
			<div class="somecoll">
				<h2 class="title">您可能还喜欢</h2>
			</div>
			<div class="inside-content" id="commodity_info_id"></div>
		</div>
	</div>
	<!-- / content -->
	<%@ include file="/jsp/fg/include/default_foot.jsp"%>
</div>
</form>
</body>
</html>